package LeetCode.month02.day51;

import LeetCode.month02.day50.ListNode;

import java.util.ArrayList;
import java.util.List;

public class No206 {
    public ListNode reverseList(ListNode head) {
        if(head==null||head.next==null) return head;
        ListNode res = reverseList(head.next);
        res.next = head;
        head.next.next=head;
        head.next = null;
        return res;
    }
}
